1. Field of the Invention
The present invention relates to an image processing apparatus and method.
2. Description of the Related Art
Local (neighborhood) image processing such as spatial filtering has been performed when an image is generated and output. Local image processing is image processing in which some computation is performed using all pixels in a spatial filter area containing the pixels to be processed (hereinafter simply referred to as processing object pixels).
For example, spatial filtering such as edge enhancement or blurring is applied to digital image data 300 shown in FIG. 3A. There are local image processing techniques in which digital image data is divided into areas and local image processing is performed in each of the areas (see U.S. Pat. No. 6,587,158, Japanese Patent Application Laid-Open No. 2000-312327, U.S. Pat. No. 6,950,559, and Japanese Patent Application Laid-Open No. 2006-139606). These techniques, in general, divide one picture of digital image data into strip-like areas and apply various types of image processing to the areas one after another, as shown in FIGS. 3A to 3D.
The strip-like areas are called band areas, a memory area in which the band areas are loaded is called band memory, and the act of dividing a picture is called band division. A band memory may be provided in any memory area on a system. For simplicity of explanation, an example will be described herein in which the band memory is provided in a main memory.
As a coordinate system (main scanning direction, sub scanning direction) for digital image data, a new coordinate system (band area coordinate system) having the length and height directions is defined, and a band area is represented by length times height, as shown in FIG. 3E. The length of a band area is always equal to the value of the width of digital image data in the main scanning direction or the height in the sub scanning direction; the height of the band area can be any value.
The band processing will be described in further detail. A first band area 301 shown in FIG. 3A is first loaded (rendered) into a band memory on a main memory and image processing is applied to the first band area 301. Then, a second band area 302 shown in FIG. 3B is loaded on the band memory where the first band area 301 has been loaded to overwrite the first band area 301 and image processing is applied to the second band area 302. A third band area 303 shown in FIG. 3C is loaded on the band memory where the second band area 302 has been loaded to overwrite the second band area 302 and image processing is applied to the third band area 303. Finally, a fourth band area 304 shown in FIG. 3D is loaded on the band memory where the third band area 303 has been loaded to overwrite the third band area 303 and image processing is applied to the fourth band area 304.
As is apparent from FIGS. 3A to 3D, the band areas 301 to 304 have the same length but do not need to have the same height. The height of the band memory, which is a memory area reserved on the main memory, is determined by the height of the highest band areas (the first to third band areas 301 to 303 in FIGS. 3A to 3D).
In these techniques, a scheme is used for overlapping adjacent band areas at the boundaries between them so that local image processing can be performed with no space between the adjacent band areas. In Japanese Patent Application No. 2006-139606, pixels are scanned one by one in the direction of height of each band area so that the size of a delay memory holding processing object pixels required for local image processing is defined by the height of the band area, thereby reducing the size of the delay memory.
With the aim of differentiating devices, the resolutions of digital image data are being increased to improve image quality. As the resolutions increase, the amount of data to be processed in image processing is also increasing. It is desirable to avoid increasing the size of circuitry with increasing amount of data to be processed in image processing. To keep the feeling users experience optimal while using devices, image processing time cannot be increased. Therefore there is also a demand for a method for increasing the speed of image processing with increasing resolution of digital image data.
While the related art techniques specify that pixels are scanned one by one in the direction of height of band areas in local image processing and make mention of reducing the size of delay memories, the related art techniques did not sufficiently increase the speed of image processing.